Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate stop names and trip headsigns #169

Merged
merged 1 commit into from
Jan 4, 2019
Merged

Conversation

landonreed
Copy link
Contributor

This adds validation checks for:

  • stop names (that they exist and are not the same as the stop description) and
  • trip headsigns (that they do not contain route name and do not begin with "to" or "towards" per http://gtfs.org/best-practices#tripstxt)

References #167.

@codecov-io
Copy link

codecov-io commented Dec 19, 2018

Codecov Report

Merging #169 into dev will increase coverage by 0.12%.
The diff coverage is 62.5%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev     #169      +/-   ##
============================================
+ Coverage     55.15%   55.27%   +0.12%     
- Complexity      736      740       +4     
============================================
  Files           143      143              
  Lines          7198     7222      +24     
  Branches        833      840       +7     
============================================
+ Hits           3970     3992      +22     
+ Misses         2885     2884       -1     
- Partials        343      346       +3
Impacted Files Coverage Δ Complexity Δ
...java/com/conveyal/gtfs/error/NewGTFSErrorType.java 100% <100%> (ø) 2 <0> (ø) ⬇️
...va/com/conveyal/gtfs/validator/NamesValidator.java 56.41% <55%> (-1.49%) 7 <0> (+2)
...java/com/conveyal/gtfs/loader/JDBCTableReader.java 72.72% <0%> (+7.95%) 9% <0%> (+2%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cab706f...57566ec. Read the comment docs.

Copy link
Contributor

@evansiroky evansiroky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but it would be awesome to have tests to verify that the correct errors are being created for feeds that have data that would trigger these errors.

@evansiroky evansiroky assigned landonreed and unassigned evansiroky Jan 4, 2019
@landonreed
Copy link
Contributor Author

Good point. This goes for a lot of other validators, too. I just created #174 to track this.

@landonreed landonreed merged commit be32a87 into dev Jan 4, 2019
@landonreed landonreed deleted the improve-name-validator branch January 4, 2019 15:46
@landonreed
Copy link
Contributor Author

🎉 This PR is included in version 4.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants